import request from '@/utils/request'

/**
 * 分页参数查询友链信息
 * @param {*} pageQuery 
 * @returns 
 */
export const getFriendListService = (pageQuery) => {
    return request.get("/admin/friend/page", {
        params: pageQuery
    })
}

/**
 * 审核友链申请
 * @param {*} query 
 * @returns 
 */
export const checkApplyFriendService = (query) => {
    return request.put("/admin/friend/pass",query)
}

/**
 * 根据id查询友链详情
 * @param {*} id 
 * @returns 
 */
export const getFriendDetailByIdService = (id) => {
    return request.get(`/admin/friend/${id}`)
}

/**
 * 批量删除友链数据
 * @param {*} ids 
 * @returns 
 */
export const deleteBatchFriendsService = (ids) => {
    return request.delete('/admin/friend', {
        data: ids
    })
}